import request from '@/utils/request'

// 获取员工列表
export function getEmployeeList(params) {
  return request({
    url: '/park/sys/user',
    method: 'get',
    params
  })
}

// 获取员工详情
export function getEmployeeDetail(id) {
  return request({
    url: `/park/sys/user/${id}`,
    method: 'get'
  })
}

// 添加员工
export function addEmployee(data) {
  return request({
    url: '/park/sys/user',
    method: 'post',
    data
  })
}

// 修改员工
export function updateEmployee(data) {
  return request({
    url: '/park/sys/user',
    method: 'put',
    data
  })
}

// 删除员工
export function deleteEmployee(id) {
  return request({
    url: `/park/sys/user/${id}`,
    method: 'delete'
  })
}

// 重置密码
export function resetPassword(id) {
  return request({
    url: `/park/sys/user/resetPwd`,
    method: 'put',
    data: { id }
  })
}
